<?php

class Adb_Database extends Adb
{

  protected static $instances = array();

  /**
   *
   * @return AdbDatabase
   */
  public static function getInstance($database, $profile = null)
  {
    if (empty(self::$instances[$database])) {
      self::$instances[$database] = new Adb_Database($database, $profile);
    }

    return self::$instances[$database];
  }

  protected function __construct($name, $profile = null)
  {
    parent::__construct($name, $profile);
  }

  public function listTables()
  {
    return $this->manager()->listTables();
  }

}
